home *** CD-ROM | disk | FTP | other *** search
/ Champak 62 / Volume 62 - JOGO DISK .iso / Games / penguinpass.swf / scripts / frame_24 / PlaceObject2_86_76 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Text File  |  2008-03-17  |  1KB  |  32 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.placeposition > 0 && _root.gotshape == false)
  3.    {
  4.       _root.placeposition = 0;
  5.    }
  6.    if(_root.placeposition > 0 && _root.gotshape == true && _root.board[_root.placeposition] == 0)
  7.    {
  8.       _root.fx.gotoAndPlay("click");
  9.       _root.board[_root.placeposition] = 1;
  10.       _root.cursorshape.gotoAndStop(1);
  11.       _root.gotshape = false;
  12.       _root["pos" + _root.placeposition].placeshape = _root.cursorshape.placeshape;
  13.       _root["pos" + _root.placeposition].gotoAndStop(2);
  14.       _root.nextshape.placeshape = _root["level" + _root.level][_root.turn];
  15.       _root.nextshape.gotoAndStop(2);
  16.       _root.turn = _root.turn + 1;
  17.       gs = _root["pos" + _root.placeposition].placeshape;
  18.       gy = _root.gy;
  19.       gx = _root.gx;
  20.       _root.grid[gy * 45 + gx * 3] = _root.block1[gs];
  21.       _root.grid[gy * 45 + (gx * 3 + 1)] = _root.block2[gs];
  22.       _root.grid[gy * 45 + (gx * 3 + 2)] = _root.block3[gs];
  23.       _root.grid[gy * 45 + 15 + gx * 3] = _root.block4[gs];
  24.       _root.grid[gy * 45 + 15 + (gx * 3 + 1)] = _root.block5[gs];
  25.       _root.grid[gy * 45 + 15 + (gx * 3 + 2)] = _root.block6[gs];
  26.       _root.grid[gy * 45 + 30 + gx * 3] = _root.block7[gs];
  27.       _root.grid[gy * 45 + 30 + (gx * 3 + 1)] = _root.block8[gs];
  28.       _root.grid[gy * 45 + 30 + (gx * 3 + 2)] = _root.block9[gs];
  29.       _root.populate();
  30.    }
  31. }
  32.